<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<script src="scripts/jquery.min.js"></script>
<%String ctx=request.getContextPath();%>
<html>
  <head>
    <title>新闻中国</title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
  <div id="header">
    <div id="top_login">
      <form action="<%=ctx%>/LoginServlet" method="post" onsubmit="return check()">
        <label> 登录名 </label>
        <input type="text" name="uname" id="uname" value="" class="login_input" />
        <label> 密&#160;&#160;码 </label>
        <input type="password" name="upwd" id="upwd" value="" class="login_input" />
        <input type="submit" class="login_sub" value="登录" />
        <label id="error"> </label>
        <img src="images/friend_logo.gif" alt="Google" id="friend_logo" />
      </form>
    </div>
    <div id="nav">
      <div id="logo"> <img src="images/logo.jpg" alt="新闻中国" /> </div>
      <div id="a_b01"> <img src="images/a_b01.gif" alt="" /> </div>
      <!--mainnav end-->
    </div>
  </div>
  <div id="container">
    <%@include file="index-elements/index_sidebar.jsp"%>
    <div class="main">
      <div class="class_type"> <img src="images/class_type.gif" alt="新闻中心" /> </div>
      <div class="content">
        <ul class="class_date">
          <!--此处展示新闻主题topic-->
          <c:forEach items="${topicList}" var="topic">
<%--            <a class="Title_topics"><b>${topic.tname}</b></a>--%>
            <a class="Title_topics" href="<%=ctx%>/NewsServlet?opr=topicNews&tid=${topic.tid}"><b>${topic.tname}</b></a>
          </c:forEach>
        </ul>
        <ul class="classlist">
          <!--此处展示新闻列表-->
          <c:forEach items="${sessionScope.topicNewsList}" var="news">
            <li><a href="<%=ctx%>/NewsServlet?opr=readNews&id=${news.nid}">${news.ntitle}</a><span></span></li>
          </c:forEach>
        </ul>
      </div>
      <%@include file="index-elements/index_rightbar.html"%>
    </div>
  </div>
  <%@include file="index-elements/index_bottom.html"%>
  </body>
</html>
